<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddEndTimeIndexInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addIndex(['end_time'], ['type' => 'normal', 'name' => 'idx_end_time'])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeIndexByName('idx_end_time')
            ->save();
    }
}
